import request from '../request'
import type { OssTokenVO } from '@/types/oss'

export const ossApi = {
  // 获取上传凭证
  getToken: (dir: string) => {
    return request<OssTokenVO>({
      url: '/v1/oss/token',
      method: 'get',
      params: { dir }
    })
  },

  // 删除文件
  deleteFile: (objectName: string) => {
    return request({
      url: '/v1/oss',
      method: 'delete',
      params: { objectName }
    })
  }
} 